package com.hunny.factory.simple;

import com.hunny.factory.mode.car.AaCar;
import com.hunny.factory.mode.car.BaseCar;
import com.hunny.factory.mode.car.BbCar;

/**
 * @author Create By Cb
 * @since 2022/4/24 17:00
 */
public class CarSimpleFactory {

    public BaseCar createCar(String carKey) {
        switch (carKey) {
            case "aa":
                return new AaCar();
            case "bb":
                return new BbCar();
            default:
                return null;
        }
    }
}